<?php

use yii\widgets\ActiveForm;
use common\helpers\Url;

?>

    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            <h4 class="modal-title">税费预览</h4>
        </div>
        <div class="modal-body">
            <div class='col-sm-2 text-right'>总业绩:</div><div class='col-sm-10'><?= $model->sales?></div>
            <div class='col-sm-2 text-right'>总奖金:</div><div class='col-sm-10'><?= $model->bonus?></div>
            <div class='col-sm-2 text-right'>扣税:</div><div class='col-sm-10'><?= $model->tax?> (预计)</div>
            <div class='col-sm-2 text-right'>管理费:</div><div class='col-sm-10'><?= $model->fee?> (预计)</div>
            <div class='col-sm-2 text-right'>实发:</div><div class='col-sm-10'><?= $model->bonus_real?> (预计)</div>
            <div class='col-sm-2 text-right'>拨比:</div><div class='col-sm-10'><?= $model->sales > 0 ? intval($model->bonus_real / $model->sales * 10000) / 100 : '-';?>% (预计，仅此奖拨比)</div>
            <div class='col-sm-2 text-right'>总业绩:</div><div class='col-sm-10'><?= $sumModel['sales']?></div>
            <div class='col-sm-2 text-right'>总实发:</div><div class='col-sm-10'><?= $sumModel['bonus_real']?> (预计)</div>
            <div class='col-sm-2 text-right'>总拨比:</div><div class='col-sm-10'><?= $sumModel['sales'] > 0 ? intval($sumModel['bonus_real'] / $sumModel['sales'] * 10000) / 100 : '-';?>% (预计，仅此奖拨比)</div>
        </div>
        <div class="modal-footer">
            <p class="text-danger text-left">* 如需调整请到系统管理--网站设置--奖金配置中修改</p>
            <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
            <a href="<?= Url::to(['collision-fee', 'id'=>$model->id])?>" class="btn btn-danger" onclick="if(!confirm('是否确认税费无误？'))return false;">确认执行</a>
        </div>
    </div>